1420B - Rock And Lever - Codeforces Solution